home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-10 | 37.4 KB | 1,719 lines |
- ifnd LIBRARIES_BGUI_MACROS_I
- LIBRARIES_BGUI_MACROS_I SET 1
- **
- ** $VER: libraries/bgui_macros.i 37.25 (19.08.94)
- ** bgui.library macros.
- **
- ** (C) Copyright 1993-1994 Jaba Development.
- ** (C) Copyright 1993-1994 Jan van den Baard.
- ** All Rights Reserved.
- **
-
- ifnd LIBRARIES_BGUI_I
- include 'libraries/bgui.i'
- endc
-
- ifnd LIBRARIES_BGUI_OFFSETS_I
- include 'libraries/bgui_offsets.i'
- endc
-
- ifd NOTDONE
- *****************************************************************************
- *
- * General object creation macros.
- *
- #define HGroupObject BGUI_NewObject( BGUI_GROUP_GADGET
- #define VGroupObject BGUI_NewObject( BGUI_GROUP_GADGET,\
- GROUP_Style, GRSTYLE_VERTICAL
- #define ButtonObject BGUI_NewObject( BGUI_BUTTON_GADGET
- #define ToggleObject BGUI_NewObject( BGUI_BUTTON_GADGET,\
- GA_ToggleSelect, TRUE
- #define CycleObject BGUI_NewObject( BGUI_CYCLE_GADGET
- #define CheckBoxObject BGUI_NewObject( BGUI_CHECKBOX_GADGET
- #define InfoObject BGUI_NewObject( BGUI_INFO_GADGET
- #define StringObject BGUI_NewObject( BGUI_STRING_GADGET
- #define PropObject BGUI_NewObject( BGUI_PROP_GADGET
- #define IndicatorObject BGUI_NewObject( BGUI_INDICATOR_GADGET
- #define ProgressObject BGUI_NewObject( BGUI_PROGRESS_GADGET
- #define SliderObject BGUI_NewObject( BGUI_SLIDER_GADGET
- #define PageObject BGUI_NewObject( BGUI_PAGE_GADGET
- #define MxObject BGUI_NewObject( BGUI_MX_GADGET
- #define ListviewObject BGUI_NewObject( BGUI_LISTVIEW_GADGET
- #define ExternalObject BGUI_NewObject( BGUI_EXTERNAL_GADGET, GA_Left, 0, GA_Top, 0, GA_Width, 0, GA_Height, 0
- #define SeperatorObject BGUI_NewObject( BGUI_SEPERATOR_GADGET
-
- #define WindowObject BGUI_NewObject( BGUI_WINDOW_OBJECT
- #define FileReqObject BGUI_NewObject( BGUI_FILEREQ_OBJECT
- #define CommodityObject BGUI_NewObject( BGUI_COMMODITY_OBJECT
-
- #define EndObject TAG_END )
-
- *****************************************************************************
- *
- * Label creation.
- *
- #define Label(l) LAB_Label, l
- #define UScoreLabel(l,u) LAB_Label, l, LAB_Underscore, u
- #define Style(s) LAB_Style, s
- #define Place(p) LAB_Place, p
-
- *****************************************************************************
- *
- * Frames.
- *
- #define ButtonFrame FRM_Type, FRTYPE_BUTTON
- #define RidgeFrame FRM_Type, FRTYPE_RIDGE
- #define DropBoxFrame FRM_Type, FRTYPE_DROPBOX
- #define NeXTFrame FRM_Type, FRTYPE_NEXT
- #define RadioFrame FRM_Type, FRTYPE_RADIOBUTTON
- #define XenFrame FRM_Type, FRTYPE_XEN_BUTTON
-
- * For clarity.
- #define StringFrame RidgeFrame
- #define MxFrame RadioFrame
-
- #define FrameTitle(t) FRM_Title, t
-
- * Built-in back fills
- #define ShineRaster FRM_BackFill, SHINE_RASTER
- #define ShadowRaster FRM_BackFill, SHADOW_RASTER
- #define ShineShadowRaster FRM_BackFill, SHINE_SHADOW_RASTER
- #define FillRaster FRM_BackFill, FILL_RASTER
- #define ShineFillRaster FRM_BackFill, SHINE_FILL_RASTER
- #define ShadowFillRaster FRM_BackFill, SHADOW_FILL_RASTER
- #define ShineBlock FRM_BackFill, SHINE_BLOCK
- #define ShadowBlock FRM_BackFill, SHADOW_BLOCK
-
- *****************************************************************************
- *
- * Vector images.
- *
- #define GetPath VIT_BuiltIn, BUILTIN_GETPATH
- #define GetFile VIT_BuiltIn, BUILTIN_GETFILE
- #define CheckMark VIT_BuiltIn, BUILTIN_CHECKMARK
- #define PopUp VIT_BuiltIn, BUILTIN_POPUP
- #define ArrowUp VIT_BuiltIn, BUILTIN_ARROW_UP
- #define ArrowDown VIT_BuiltIn, BUILTIN_ARROW_DOWN
- #define ArrowLeft VIT_BuiltIn, BUILTIN_ARROW_LEFT
- #define ArrowRight VIT_BuiltIn, BUILTIN_ARROW_RIGHT
-
- *****************************************************************************
- *
- * Group class macros.
- *
- #define StartMember GROUP_Member
- #define EndMember TAG_END, 0
- #define Spacing(p) GROUP_Spacing, p
- #define HOffset(p) GROUP_HorizOffset, p
- #define VOffset(p) GROUP_VertOffset, p
- #define LOffset(p) GROUP_LeftOffset, p
- #define ROffset(p) GROUP_RightOffset, p
- #define TOffset(p) GROUP_TopOffset, p
- #define BOffset(p) GROUP_BottomOffset, p
- #define VarSpace(w) GROUP_SpaceObject, w
-
- *****************************************************************************
- *
- * Layout macros.
- *
- #define FixMinWidth LGO_FixMinWidth, TRUE
- #define FixMinHeight LGO_FixMinHeight, TRUE
- #define Weight(w) LGO_Weight, w
- #define FixWidth(w) LGO_FixWidth, w
- #define FixHeight(h) LGO_FixHeight, h
- #define Align LGO_Align, TRUE
- #define FixMinSize FixMinWidth, FixMinHeight
- #define FixSize(w,h) FixWidth(w), FixHeight(h)
-
- *****************************************************************************
- *
- * Page class macros.
- *
- #define PageMember PAGE_Member
-
- endc * NOTDONE!
-
- *****************************************************************************
- * The following macros expect the library base pointer for bgui.library
- * to already be in A6! If its not, prepare for a trip to India...
- *****************************************************************************
-
- *****************************************************************************
- *
- * "Quick" button creation macros.
- *
-
- *
- * Labeled "button" gadget with label
- *
- Button macro ;label,id
- ifne NARG-2
- fail 'Wrong number of arguments to "Button" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #\2,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_BUTTON_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 28(sp),sp
- endm
-
- *
- * Labeled "button" gadget with HotKey
- *
- KeyButton macro ;label,id
- ifne NARG-2
- fail 'Wrong number of arguments to "KeyButton" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #\2,-(sp)
- move.l #GA_ID,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_BUTTON_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 36(sp),sp
- endm
-
- *
- * Labeled "toggle" gadget
- *
- Toggle macro ;label,state,id
- ifne NARG-3
- fail 'Wrong number of arguments to "Toggle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #\3,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\2,-(sp)
- move.l #GA_Selected,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #1,-(sp)
- move.l #GA_ToggleSelect,-(sp)
- movea.l a7,a0
- moveq #BGUI_BUTTON_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 44(sp),sp
- endm
-
- *
- * Labeled "toggle" gadget with HotKey
- *
- KeyToggle macro ;label,state,id
- ifne NARG-3
- fail 'Wrong number of arguments to "KeyToggle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #\3,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\2,-(sp)
- move.l #GA_Selected,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #1,-(sp)
- move.l #GA_ToggleSelect,-(sp)
- movea.l a7,a0
- moveq #BGUI_BUTTON_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * XEN-style labeled "button" gadget
- *
- XenButton macro ;label,id
- ifne NARG-2
- fail 'Wrong number of arguments to "XenButton" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_XEN_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #\2,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_BUTTON_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 28(sp),sp
- endm
-
- *
- * XEN-style labeled "button" gadget with HotKey
- *
- XenKeyButton macro ;label,id
- ifne NARG-2
- fail 'Wrong number of arguments to "XenKeyButton" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_XEN_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #\2,-(sp)
- move.l #GA_ID,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_BUTTON_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 36(sp),sp
- endm
-
- *
- * XEN-style labeled "toggle" gadget
- *
- XenToggle macro ;label,state,id
- ifne NARG-3
- fail 'Wrong number of arguments to "XenToggle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_XEN_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #\3,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\2,-(sp)
- move.l #GA_Selected,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #1,-(sp)
- move.l #GA_ToggleSelect,-(sp)
- movea.l a7,a0
- moveq #BGUI_BUTTON_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 44(sp),sp
- endm
-
- *
- * XEN-style labeled "toggle" gadget with HotKey
- *
- XenKeyToggle macro ;label,state,id
- ifne NARG-3
- fail 'Wrong number of arguments to "XenKeyToggle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #\3,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\2,-(sp)
- move.l #GA_Selected,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #1,-(sp)
- move.l #GA_ToggleSelect,-(sp)
- movea.l a7,a0
- moveq #BGUI_BUTTON_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *****************************************************************************
- *
- * "Quick" cycle creation macros.
- *
-
- *
- * Labeled "cycle" gadget
- *
- Cycle macro ;label,labels,active,id
- ifne NARG-4
- fail 'Wrong number of arguments to "Cycle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #CYC_Active,-(sp)
- move.l #\2,-(sp)
- move.l #CYC_Labels,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- movea.l a7,a0
- moveq #BGUI_CYCLE_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 44(sp),sp
- endm
-
- *
- * Labeled "cycle" gadget with HotKey
- *
- KeyCycle macro ;label,labels,active,id
- ifne NARG-4
- fail 'Wrong number of arguments to "KeyCycle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #CYC_Active,-(sp)
- move.l #\2,-(sp)
- move.l #CYC_Labels,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- movea.l a7,a0
- moveq #BGUI_CYCLE_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * XEN-style labeled "cycle" gadget
- *
- XenCycle macro ;label,labels,active,id
- ifne NARG-4
- fail 'Wrong number of arguments to "XenCycle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #CYC_Active,-(sp)
- move.l #\2,-(sp)
- move.l #CYC_Labels,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #FRTYPE_XEN_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- movea.l a7,a0
- moveq #BGUI_CYCLE_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 44(sp),sp
- endm
-
- *
- * XEN-style labeled "cycle" gadget with HotKey
- *
- XenKeyCycle macro ;label,labels,active,id
- ifne NARG-4
- fail 'Wrong number of arguments to "XenKeyCycle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #CYC_Active,-(sp)
- move.l #\2,-(sp)
- move.l #CYC_Labels,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #FRTYPE_XEN_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- movea.l a7,a0
- moveq #BGUI_CYCLE_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * Labeled PopUp "cycle" gadget
- *
- PopCycle macro ;label,labels,active,id
- ifne NARG-4
- fail 'Wrong number of arguments to "PopCycle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #CYC_Active,-(sp)
- move.l #\2,-(sp)
- move.l #CYC_Labels,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #1,-(sp)
- move.l #CYC_Popup,-(sp)
- movea.l a7,a0
- moveq #BGUI_CYCLE_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * Labeled PopUp "cycle" gadget with HotKey
- *
- KeyPopCycle macro ;label,labels,active,id
- ifne NARG-4
- fail 'Wrong number of arguments to "KeyPopCycle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #CYC_Active,-(sp)
- move.l #\2,-(sp)
- move.l #CYC_Labels,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #1,-(sp)
- move.l #CYC_Popup,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- movea.l a7,a0
- moveq #BGUI_CYCLE_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 60(sp),sp
- endm
-
- *
- * XEN-style labeled PopUp "cycle" gadget
- *
- XenPopCycle macro ;label,labels,active,id
- ifne NARG-4
- fail 'Wrong number of arguments to "XenPopCycle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #CYC_Active,-(sp)
- move.l #\2,-(sp)
- move.l #CYC_Labels,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #FRTYPE_XEN_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #1,-(sp)
- move.l #CYC_Popup,-(sp)
- movea.l a7,a0
- moveq #BGUI_CYCLE_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * XEN-style labeled PopUp "cycle" gadget with HotKey
- *
- XenKeyPopCycle macro ;label,labels,active,id
- ifne NARG-4
- fail 'Wrong number of arguments to "XenKeyPopCycle" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #CYC_Active,-(sp)
- move.l #\2,-(sp)
- move.l #CYC_Labels,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- move.l #FRTYPE_XEN_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #1,-(sp)
- move.l #CYC_Popup,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- movea.l a7,a0
- moveq #BGUI_CYCLE_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 60(sp),sp
- endm
-
- ifd NOTDONE
- *****************************************************************************
- *
- * "Quick" checkbox creation macros.
- *
-
- *
- * Standard labeled "checkbox" gadget
- CheckBox macro ;label,state,id
- ifne NARG-3
- fail 'Wrong number of arguments to "CheckBox" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #FRF_EDGES_ONLY,-(sp)
- move.l #FRM_Flags,-(sp)
- move.l #\3,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\2,-(sp)
- move.l #GA_Selected,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_CHECKBOX_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 44(sp),sp
- endm
- **** FixMinSize
-
- #define KeyCheckBox(label,state,id)\
- CheckBoxObject,\
- LAB_Label, label,\
- LAB_Underscore, '_',\
- GA_ID, id,\
- ButtonFrame,\
- FRM_Flags, FRF_EDGES_ONLY,\
- GA_Selected, state,\
- EndObject, FixMinSize
-
- #define XenCheckBox(label,state,id)\
- CheckBoxObject,\
- LAB_Label, label,\
- GA_ID, id,\
- XenFrame,\
- FRM_Flags, FRF_EDGES_ONLY,\
- GA_Selected, state,\
- EndObject, FixMinSize
-
- #define XenKeyCheckBox(label,state,id)\
- CheckBoxObject,\
- LAB_Label, label,\
- LAB_Underscore, '_',\
- GA_ID, id,\
- XenFrame,\
- FRM_Flags, FRF_EDGES_ONLY,\
- GA_Selected, state,\
- EndObject, FixMinSize
-
- endc * NOTDONE!
-
- *****************************************************************************
- *
- * "Quick" info object creation macros.
- *
-
- *
- * Labeled "info" gadget with Fixed width
- *
- InfoFixed macro ;label,text,args,numlines
- ifne NARG-4
- fail 'Wrong number of arguments to "InfoFixed" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #FRF_RECESSED,-(sp)
- move.l #FRM_Flags,-(sp)
- move.l #1,-(sp)
- move.l #INFO_FixTextWidth,-(sp)
- move.l #\4,-(sp)
- move.l #INFO_MinLines,-(sp)
- move.l #\3,-(sp)
- move.l #INFO_Args,-(sp)
- move.l #\2,-(sp)
- move.l #INFO_TextFormat,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_INFO_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 60(sp),sp
- endm
-
- *
- * Labeled "info" gadget
- *
- InfoObj macro ;label,text,args,numlines
- ifne NARG-4
- fail 'Wrong number of arguments to "InfoObj" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #FRF_RECESSED,-(sp)
- move.l #FRM_Flags,-(sp)
- move.l #\4,-(sp)
- move.l #INFO_MinLines,-(sp)
- move.l #\3,-(sp)
- move.l #INFO_Args,-(sp)
- move.l #\2,-(sp)
- move.l #INFO_TextFormat,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_INFO_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *****************************************************************************
- *
- * "Quick" string/integer creation macros.
- *
-
- *
- * Labeled "string" gadget
- *
- String macro ;label,contents,maxchars,id
- ifne NARG-4
- fail 'Wrong number of arguments to "String" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_RIDGE,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #STRINGA_MaxChars,-(sp)
- move.l #\2,-(sp)
- move.l #STRINGA_TextVal,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_STRING_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 44(sp),sp
- endm
-
- *
- * Labeled "string" gadget with HotKey
- *
- KeyString macro ;label,contents,maxchars,id
- ifne NARG-4
- fail 'Wrong number of arguments to "KeyString" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_RIDGE,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #STRINGA_MaxChars,-(sp)
- move.l #\2,-(sp)
- move.l #STRINGA_TextVal,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_STRING_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * Labeled "string" gadget with Tab-key cycling on
- *
- TabString macro ;label,contents,maxchars,id
- ifne NARG-4
- fail 'Wrong number of arguments to "TabString" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_RIDGE,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #1,-(sp)
- move.l #GA_TabCycle,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #STRINGA_MaxChars,-(sp)
- move.l #\2,-(sp)
- move.l #STRINGA_TextVal,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_STRING_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * Labeled "string" gadget with HotKey and Tab-key cycling on
- *
- TabKeyString macro ;label,contents,maxchars,id
- ifne NARG-4
- fail 'Wrong number of arguments to "TabKeyString" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_RIDGE,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #1,-(sp)
- move.l #GA_TabCycle,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #STRINGA_MaxChars,-(sp)
- move.l #\2,-(sp)
- move.l #STRINGA_TextVal,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_STRING_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 60(sp),sp
- endm
-
- *
- * Labeled "integer" gadget
- *
- Integer macro ;label,contents,maxchars,id
- ifne NARG-4
- fail 'Wrong number of arguments to "Integer" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_RIDGE,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #STRINGA_MaxChars,-(sp)
- move.l #\2,-(sp)
- move.l #STRINGA_LongVal,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_STRING_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 44(sp),sp
- endm
-
- *
- * Labeled "integer" gadget with HotKey
- *
- KeyInteger macro ;label,contents,maxchars,id
- ifne NARG-4
- fail 'Wrong number of arguments to "KeyInteger" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_RIDGE,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #STRINGA_MaxChars,-(sp)
- move.l #\2,-(sp)
- move.l #STRINGA_LongVal,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_STRING_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * Labeled "integer" gadget with Tab-key cycling on
- *
- TabInteger macro ;label,contents,maxchars,id
- ifne NARG-4
- fail 'Wrong number of arguments to "TabInteger" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_RIDGE,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #1,-(sp)
- move.l #GA_TabCycle,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #STRINGA_MaxChars,-(sp)
- move.l #\2,-(sp)
- move.l #STRINGA_LongVal,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_STRING_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * Labeled "integer" gadget with HotKey and Tab-key cycling on
- *
- TabKeyInteger macro ;label,contents,maxchars,id
- ifne NARG-4
- fail 'Wrong number of arguments to "TabKeyInteger" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_RIDGE,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #1,-(sp)
- move.l #GA_TabCycle,-(sp)
- move.l #\4,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\3,-(sp)
- move.l #STRINGA_MaxChars,-(sp)
- move.l #\2,-(sp)
- move.l #STRINGA_LongVal,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_STRING_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 60(sp),sp
- endm
-
- ifd NOTDONE
- *
- * STRINGA_Pens & STRINGA_ActivePens pen-pack macro.
- *
- #define PACKPENS(a,b) (((\2<<8)&0xFF00)|((\1)&0x00FF))
- endc * NOTDONE
-
- *****************************************************************************
- *
- * "Quick" scroller creation macros.
- *
-
- *
- * Labeled "horizontal scroller" gadget
- *
- HorizScroller macro ;label,top,total,visible,id
- ifne NARG-5
- fail 'Wrong number of arguments to "HorizScroller" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #1,-(sp)
- move.l #PGA_Arrows,-(sp)
- move.l #FREEHORIZ,-(sp)
- move.l #PGA_Freedom,-(sp)
- move.l #\5,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\4,-(sp)
- move.l #PGA_Visible,-(sp)
- move.l #\3,-(sp)
- move.l #PGA_Total,-(sp)
- move.l #\2,-(sp)
- move.l #PGA_Top,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_PROP_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 60(sp),sp
- endm
-
- *
- * Labeled "vertical scroller" gadget
- *
- VertScroller macro ;label,top,total,visible,id
- ifne NARG-5
- fail 'Wrong number of arguments to "VertScroller" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #1,-(sp)
- move.l #PGA_Arrows,-(sp)
- move.l #\5,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\4,-(sp)
- move.l #PGA_Visible,-(sp)
- move.l #\3,-(sp)
- move.l #PGA_Total,-(sp)
- move.l #\2,-(sp)
- move.l #PGA_Top,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_PROP_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * Labeled "horizontal scroller" gadget with HotKey
- *
- KeyHorizScroller macro ;label,top,total,visible,id
- ifne NARG-5
- fail 'Wrong number of arguments to "KeyHorizScroller" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #1,-(sp)
- move.l #PGA_Arrows,-(sp)
- move.l #FREEHORIZ,-(sp)
- move.l #PGA_Freedom,-(sp)
- move.l #\5,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\4,-(sp)
- move.l #PGA_Visible,-(sp)
- move.l #\3,-(sp)
- move.l #PGA_Total,-(sp)
- move.l #\2,-(sp)
- move.l #PGA_Top,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_PROP_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 68(sp),sp
- endm
-
- *
- * Labeled "vertical scroller" gadget with HotKey
- *
- KeyVertScroller macro ;label,top,total,visible,id
- ifne NARG-5
- fail 'Wrong number of arguments to "KeyVertScroller" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #1,-(sp)
- move.l #PGA_Arrows,-(sp)
- move.l #\5,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\4,-(sp)
- move.l #PGA_Visible,-(sp)
- move.l #\3,-(sp)
- move.l #PGA_Total,-(sp)
- move.l #\2,-(sp)
- move.l #PGA_Top,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_PROP_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 60(sp),sp
- endm
-
- *****************************************************************************
- *
- * "Quick" indicator creation macros.
- *
-
- *
- * "indicator" gadget
- *
- Indicator macro ;min,max,level,just
- ifne NARG-4
- fail 'Wrong number of arguments to "Indicator" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\4,-(sp)
- move.l #INDIC_Justification,-(sp)
- move.l #\3,-(sp)
- move.l #INDIC_Level,-(sp)
- move.l #\2,-(sp)
- move.l #INDIC_Max,-(sp)
- move.l #\1,-(sp)
- move.l #INDIC_Min,-(sp)
- movea.l a7,a0
- moveq #BGUI_INDICATOR_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 36(sp),sp
- endm
-
- *
- * "indicator" gadget with User formatting
- *
- IndicatorFormat macro ;min,max,level,just,format
- ifne NARG-5
- fail 'Wrong number of arguments to "IndicatorFormat" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\5,-(sp)
- move.l #INDIC_FormatString,-(sp)
- move.l #\4,-(sp)
- move.l #INDIC_Justification,-(sp)
- move.l #\3,-(sp)
- move.l #INDIC_Level,-(sp)
- move.l #\2,-(sp)
- move.l #INDIC_Max,-(sp)
- move.l #\1,-(sp)
- move.l #INDIC_Min,-(sp)
- movea.l a7,a0
- moveq #BGUI_INDICATOR_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 44(sp),sp
- endm
-
- *****************************************************************************
- *
- * "Quick" progress creation macros.
- *
-
- *
- * Labeled horizontal "progress" gadget
- *
- HorizProgress macro ;label,min,max,done
- ifne NARG-4
- fail 'Wrong number of arguments to "HorizProgress" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #FRF_RECESSED,-(sp)
- move.l #FRM_Flags,-(sp)
- move.l #\4,-(sp)
- move.l #PROGRESS_Done,-(sp)
- move.l #\3,-(sp)
- move.l #PROGRESS_Max,-(sp)
- move.l #\2,-(sp)
- move.l #PROGRESS_Min,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_PROGRESS_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * Labeled vertical "progress" gadget
- *
- VertProgress macro ;label,min,max,done
- ifne NARG-4
- fail 'Wrong number of arguments to "VertProgress" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FRTYPE_BUTTON,-(sp)
- move.l #FRM_Type,-(sp)
- move.l #FRF_RECESSED,-(sp)
- move.l #FRM_Flags,-(sp)
- move.l #1,-(sp)
- move.l #PROGRESS_Vertical,-(sp)
- move.l #\4,-(sp)
- move.l #PROGRESS_Done,-(sp)
- move.l #\3,-(sp)
- move.l #PROGRESS_Max,-(sp)
- move.l #\2,-(sp)
- move.l #PROGRESS_Min,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_PROGRESS_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 60(sp),sp
- endm
-
- *****************************************************************************
- *
- * "Quick" slider creation macros.
- *
-
- *
- * Labeled horizontal "slider" gadget
- *
- HorizSlider macro ;label,min,max,level,id
- ifne NARG-5
- fail 'Wrong number of arguments to "HorizSlider" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\5,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\4,-(sp)
- move.l #SLIDER_Level,-(sp)
- move.l #\3,-(sp)
- move.l #SLIDER_Max,-(sp)
- move.l #\2,-(sp)
- move.l #SLIDER_Min,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_SLIDER_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 44(sp),sp
- endm
-
- *
- * Labeled vertical "slider" gadget
- *
- VertSlider macro ;label,min,max,level,id
- ifne NARG-5
- fail 'Wrong number of arguments to "VertSlider" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #FREEVERT,-(sp)
- move.l #PGA_Freedom,-(sp)
- move.l #\5,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\4,-(sp)
- move.l #SLIDER_Level,-(sp)
- move.l #\3,-(sp)
- move.l #SLIDER_Max,-(sp)
- move.l #\2,-(sp)
- move.l #SLIDER_Min,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_SLIDER_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * Labeled horizontal "slider" gadget with HotKey
- *
- KeyHorizSlider macro ;label,min,max,level,id
- ifne NARG-5
- fail 'Wrong number of arguments to "KeyHorizSlider" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #\5,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\4,-(sp)
- move.l #SLIDER_Level,-(sp)
- move.l #\3,-(sp)
- move.l #SLIDER_Max,-(sp)
- move.l #\2,-(sp)
- move.l #SLIDER_Min,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_SLIDER_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 52(sp),sp
- endm
-
- *
- * Labeled vertical "slider" gadget with HotKey
- *
- KeyVertSlider macro ;label,min,max,level,id
- ifne NARG-5
- fail 'Wrong number of arguments to "KeyVertSlider" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #'_',-(sp)
- move.l #LAB_Underscore,-(sp)
- move.l #FREEVERT,-(sp)
- move.l #PGA_Freedom,-(sp)
- move.l #\5,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\4,-(sp)
- move.l #SLIDER_Level,-(sp)
- move.l #\3,-(sp)
- move.l #SLIDER_Max,-(sp)
- move.l #\2,-(sp)
- move.l #SLIDER_Min,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_SLIDER_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 60(sp),sp
- endm
-
- ifd NOTDONE
- *****************************************************************************
- *
- * "Quick" mx creation macros.
- *
- #define RightMx(label,labels,active,id)\
- MxObject,\
- GROUP_Style, GRSTYLE_VERTICAL,\
- LAB_Label, label,\
- MX_Labels, labels,\
- MX_Active, active,\
- GA_ID, id,\
- EndObject, FixMinSize
-
- #define LeftMx(label,labels,active,id)\
- MxObject,\
- GROUP_Style, GRSTYLE_VERTICAL,\
- LAB_Label, label,\
- MX_Labels, labels,\
- MX_Active, active,\
- MX_LabelPlace, PLACE_LEFT,\
- GA_ID, id,\
- EndObject, FixMinSize
-
- #define RightMxKey(label,labels,active,id)\
- MxObject,\
- GROUP_Style, GRSTYLE_VERTICAL,\
- LAB_Label, label,\
- LAB_Underscore, '_',\
- MX_Labels, labels,\
- MX_Active, active,\
- GA_ID, id,\
- EndObject, FixMinSize
-
- #define LeftMxKey(label,labels,active,id)\
- MxObject,\
- GROUP_Style, GRSTYLE_VERTICAL,\
- LAB_Label, label,\
- LAB_Underscore, '_',\
- MX_Labels, labels,\
- MX_Active, active,\
- MX_LabelPlace, PLACE_LEFT,\
- GA_ID, id,\
- EndObject, FixMinSize
-
- endc * NOTDONE
-
- *****************************************************************************
- *
- * "Quick" listview creation macros.
- *
-
- *
- * Labeled "listview" gadget
- *
- StrListview macro ;label,strings,id
- ifne NARG-3
- fail 'Wrong number of arguments to "StrListview" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #\3,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\2,-(sp)
- move.l #LISTV_EntryArray,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_LISTVIEW_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 28(sp),sp
- endm
-
- *
- * Labeled "listview" gadget with sorted entries
- *
- StrListviewSorted macro ;label,strings,id
- ifne NARG-3
- fail 'Wrong number of arguments to "StrListviewSorted" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #1,-(sp)
- move.l #LISTV_SortEntryArray,-(sp)
- move.l #\3,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\2,-(sp)
- move.l #LISTV_EntryArray,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_LISTVIEW_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 36(sp),sp
- endm
-
- *
- * Labeled READ-ONLY "listview" gadget
- *
- ReadStrListview macro ;label,strings
- ifne NARG-2
- fail 'Wrong number of arguments to "ReadStrListview" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #1,-(sp)
- move.l #LISTV_ReadOnly,-(sp)
- move.l #\2,-(sp)
- move.l #LISTV_EntryArray,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_LISTVIEW_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 28(sp),sp
- endm
-
- *
- * Labeled READ-ONLY "listview" gadget with sorted entries
- *
- ReadStrListviewSorted macro ;label,strings
- ifne NARG-2
- fail 'Wrong number of arguments to "ReadStrListviewSorted" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #1,-(sp)
- move.l #LISTV_ReadOnly,-(sp)
- move.l #1,-(sp)
- move.l #LISTV_SortEntryArray
- move.l #\2,-(sp)
- move.l #LISTV_EntryArray,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_LISTVIEW_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 36(sp),sp
- endm
-
- *
- * Labeled multi-select "listview" gadget
- *
- MultiStrListview macro ;label,strings,id
- ifne NARG-3
- fail 'Wrong number of arguments to "MultiStrListview" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #1,-(sp)
- move.l #LISTV_MultiSelect,-(sp)
- move.l #\3,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\2,-(sp)
- move.l #LISTV_EntryArray,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_LISTVIEW_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 36(sp),sp
- endm
-
- *
- * Labeled multi-select "listview" gadget with sorted entries
- *
- MultiStrListviewSorted macro ;label,strings,id
- ifne NARG-3
- fail 'Wrong number of arguments to "MultiStrListviewSorted" macro!'
- exitm
- endc
-
- move.l #TAG_DONE,-(sp)
- move.l #1,-(sp)
- move.l #LISTV_MultiSelect,-(sp)
- move.l #1,-(sp)
- move.l #LISTV_SortEntryArray,-(sp)
- move.l #\3,-(sp)
- move.l #GA_ID,-(sp)
- move.l #\2,-(sp)
- move.l #LISTV_EntryArray,-(sp)
- move.l #\1,-(sp)
- move.l #LAB_Label,-(sp)
- movea.l a7,a0
- moveq #BGUI_LISTVIEW_GADGET,d0
- jsr _LVOBGUI_NewObjectA(a6)
- lea 44(sp),sp
- endm
-
- ifd NOTDONE
- *****************************************************************************
- *
- * "Quick" seperator bar creation macros.
- *
- #define VertSeperator\
- SeperatorObject,\
- EndObject, FixMinWidth
-
- #define VertThinSeperator\
- SeperatorObject,\
- SEP_Thin, TRUE,\
- EndObject, FixMinWidth
-
- #define HorizSeperator\
- SeperatorObject,\
- SEP_Horiz, TRUE,\
- EndObject, FixMinHeight
-
- #define TitleSeperator(t)\
- SeperatorObject,\
- SEP_Horiz, TRUE,\
- SEP_Title, t,\
- EndObject, FixMinHeight
-
- #define HTitleSeperator(t)\
- SeperatorObject,\
- SEP_Horiz, TRUE,\
- SEP_Title, t,\
- SEP_Highlight, TRUE,\
- EndObject, FixMinHeight
-
- #define CTitleSeperator(t)\
- SeperatorObject,\
- SEP_Horiz, TRUE,\
- SEP_Title, t,\
- SEP_CenterTitle, TRUE,\
- EndObject, FixMinHeight
-
- #define CHTitleSeperator(t)\
- SeperatorObject,\
- SEP_Horiz, TRUE,\
- SEP_Title, t,\
- SEP_Highlight, TRUE,\
- SEP_CenterTitle, TRUE,\
- EndObject, FixMinHeight
-
- *****************************************************************************
- *
- * Some simple menu macros.
- *
- #define Title(t)\
- { NM_TITLE, t, NULL, 0, 0, NULL }
- #define Item(t,s,i)\
- { NM_ITEM, t, s, 0, 0, (APTR)i }
- #define ItemBar\
- { NM_ITEM, NM_BARLABEL, NULL, 0, 0, NULL }
- #define SubItem(t,s,i)\
- { NM_SUB, t, s, 0, 0, (APTR)i }
- #define SubBar\
- { NM_SUB, NM_BARLABEL, NULL, 0, 0, NULL }
- #define End\
- { NM_END, NULL, NULL, 0, 0, NULL }
-
- *****************************************************************************
- *
- * Base class method macros.
- *
- #define AddMap(object,target,map)\
- DoMethod( object, BASE_ADDMAP, target, map )
-
- #define AddCondit(object,target,ttag,tdat,ftag,fdat,stag,sdat)\
- DoMethod( object, BASE_ADDCONDITIONAL, target,\
- ttag, tdat,\
- ftag, fdat,\
- stag, sdat )
-
- #define AddHook(object,hook)\
- DoMethod( object, BASE_ADDHOOK, hook )
-
- #define RemMap(object,target)\
- DoMethod( object, BASE_REMMAP, target )
-
- #define RemCondit(object,target)\
- DoMethod( object, BASE_REMCONDITIONAL, target )
-
- #define RemHook( object,hook)\
- DoMethod( object, BASE_REMHOOK, hook )
-
- *****************************************************************************
- *
- * Listview class method macros.
- *
- #define AddEntry(window,object,entry,how)\
- BGUI_DoGadgetMethod( object, window, NULL, LVM_ADDSINGLE,\
- NULL, entry, how, 0L )
-
- #define AddEntryVisible(window,object,entry,how)\
- BGUI_DoGadgetMethod( object, window, NULL, LVM_ADDSINGLE,\
- NULL, entry, how, LVASF_MAKEVISIBLE )
-
- #define AddEntrySelect(window,object,entry,how)\
- BGUI_DoGadgetMethod( object, window, NULL, LVM_ADDSINGLE,\
- NULL, entry, how, LVASF_SELECT )
-
- #define ClearList(window,object)\
- BGUI_DoGadgetMethod( object, window, NULL, LVM_CLEAR, NULL )
-
- #define FirstEntry(object)\
- DoMethod( object, LVM_FIRSTENTRY, NULL, 0L )
-
- #define FirstSelected(object)\
- DoMethod( object, LVM_FIRSTENTRY, NULL, LVGEF_SELECTED )
-
- #define LastEntry(object)\
- DoMethod( object, LVM_LASTENTRY, NULL, 0L )
-
- #define LastSelected(object)\
- DoMethod( object, LVM_LASTENTRY, NULL, LVGEF_SELECTED )
-
- #define NextEntry(object,last)\
- DoMethod( object, LVM_NEXTENTRY, last, 0L )
-
- #define NextSelected(object,last)\
- DoMethod( object, LVM_NEXTENTRY, last, LVGEF_SELECTED )
-
- #define PrevEntry(object,last)\
- DoMethod( object, LVM_PREVENTRY, last, 0L )
-
- #define PrevSelected(object,last)\
- DoMethod( object, LVM_PREVENTRY, last, LVGEF_SELECTED )
-
- #define RemoveEntry(object,entry)\
- DoMethod( object, LVM_REMENTRY, NULL, entry )
-
- #define RemoveEntryVisible(window,object,entry)\
- BGUI_DoGadgetMethod( object, window, NULL, LVM_REMENTRY, NULL, entry )
-
- #define RefreshList(window,object)\
- BGUI_DoGadgetMethod( object, window, NULL, LVM_REFRESH, NULL )
-
- #define SortList(window,object)\
- BGUI_DoGadgetMethod( object, window, NULL, LVM_SORT, NULL )
-
- #define LockList(object)\
- DoMethod( object, LVM_LOCKLIST, NULL )
-
- #define UnlockList(window,object)\
- BGUI_DoGadgetMethod( object, window, NULL, LVM_UNLOCKLIST, NULL )
-
- *****************************************************************************
- *
- * Window class method macros.
- *
- #define GadgetKey(wobj,gobj,key)\
- DoMethod( wobj, WM_GADGETKEY, NULL, gobj, key )
-
- #define WindowOpen(wobj)\
- ( struct Window * )DoMethod( wobj, WM_OPEN )
-
- #define WindowClose(wobj)\
- DoMethod( wobj, WM_CLOSE )
-
- #define WindowBusy(wobj)\
- DoMethod( wobj, WM_SLEEP )
-
- #define WindowReady(wobj)\
- DoMethod( wobj, WM_WAKEUP )
-
- #define HandleEvent(wobj)\
- DoMethod( wobj, WM_HANDLEIDCMP )
-
- #define DisableMenu(wobj,id,set)\
- DoMethod( wobj, WM_DISABLEMENU, id, set )
-
- #define CheckItem(wobj,id,set)\
- DoMethod( wobj, WM_CHECKITEM, id, set )
-
- #define MenuDisabled(wobj,id)\
- DoMethod( wobj, WM_MENUDISABLED, id )
-
- #define ItemChecked(wobj,id)\
- DoMethod( wobj, WM_ITEMCHECKED, id )
-
- #define GetAppMsg(wobj)\
- ( struct AppMessage * )DoMethod( wobj, WM_GETAPPMSG )
-
- #define AddUpdate(wobj,id,target,map)\
- DoMethod( wobj, WM_ADDUPDATE, id, target, map )
-
- *****************************************************************************
- *
- * Commodity class method macros.
- *
- #define AddHotkey(broker,desc,id,flags)\
- DoMethod( broker, CM_ADDHOTKEY, desc, id, flags )
-
- #define RemHotkey(broker,id)\
- DoMethod( broker, CM_REMHOTKEY, id )
-
- #define DisableHotkey(broker,id)\
- DoMethod( broker, CM_DISABLEHOTKEY, id )
-
- #define EnableHotKey(broker,id)\
- DoMethod( broker, CM_ENABLEHOTKEY, id )
-
- #define EnableBroker(broker)\
- DoMethod( broker, CM_ENABLEBROKER )
-
- #define DisableBroker(broker)\
- DoMethod( broker, CM_DISABLEBROKER )
-
- #define MsgInfo(broker,type,id,data)\
- DoMethod( broker, CM_MSGINFO,\
- ( ULONG * )type,\
- ( ULONG * )id,\
- ( ULONG * )data )
-
- *****************************************************************************
- *
- * FileReq class method macros.
- *
- #define DoRequest(object)\
- DoMethod( object, FRM_DOREQUEST )
-
- endc * NOTDONE!
-
- endc * LIBRARIES_BGUI_MACROS_I
-